package fr.pascal.client;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.SimpleEventBus;
import com.google.gwt.place.shared.PlaceController;

import fr.pascal.client.ui.DetailView;
import fr.pascal.client.ui.DetailViewImpl;
import fr.pascal.client.ui.ListView;
import fr.pascal.client.ui.ListViewImpl;

public class ClientFactoryImpl implements ClientFactory {

	private final EventBus eventBus = new SimpleEventBus();
	private final PlaceController placeController = new PlaceController(eventBus);
	
	private final ListView listView = new ListViewImpl();
	private final DetailView detailView = new DetailViewImpl();

	@Override
	public ListView getListView() {
		return listView;
	}

	@Override
	public DetailView getDetailView() {
		return detailView;
	}

	@Override
	public PlaceController getPlaceController() {
		return placeController;
	}

	@Override
	public EventBus getEventBus() {
		return eventBus;
	}
}
